import request from '@/utils/request.js'
// 获取基本信息
const getUserInfoAPI = () => request({
  url: '/v1_0/user'
})
// 获取生日
const getUserProfileAPI = () => request({
  url: '/v1_0/user/profile'
})
// 更新用户头像
const updataUserPhotoAPI = (fd) => request({
  url: '/v1_0/user/photo',
  method: 'PATCH',
  data: fd
})
// 更新用户信息
const updateUserProfileAPI = ({ birthday, name }) => request({
  url: '/v1_0/user/profile',
  method: 'PATCH',
  data: {
    birthday,
    name
  }
})
export {
  getUserInfoAPI,
  getUserProfileAPI,
  updataUserPhotoAPI,
  updateUserProfileAPI
}
